package com.hmall.item.task;

import com.hmall.item.service.impl.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * TODO
 *
 * @Author whx
 * @Date 2024/11/14 21:38
 */
@Component
public class PreheatTask {

    @Autowired
    private ItemService itemService;

    //    @Scheduled(cron = "0 0/2 * * * ?")
    @Scheduled(cron = "0 0 3 * * ?")
    public void preheatItems(){

        itemService.preheatItems();

    }
}
